#include <stdio.h>

int main() {
    int num;
    int count = 0;

    while (scanf("%d", &num) == 1) {
        count++;
        if (num == 250) {
            printf("%d\n", count);
            break;
        }
    }

    return 0;
}
